<?php

namespace lib;

class errorHandle {

	public static function log($msg) {
		error_log(date("[Y-m-d H:i:s]") . " -[ error : " . $msg . "\r\n", 3, "/tmp/sd_plug_err.log");
	}

	public static function throwException(\Exception $e) {
		return json_encode(
			array(
				'respCode' => 500,
				'respDesc' => $e->getMessage()
			)
		);
	}

}
